package com.ouroboroswiki.core.content.svnkit;

import org.tmatesoft.svn.core.auth.BasicAuthenticationManager;

import com.ouroboroswiki.core.AuthenticationException;
import com.ouroboroswiki.core.AuthenticationManager;

public class SVNKitAuthenticationManager implements AuthenticationManager {

	@Override
	public Object authenticate(String username, String password)
			throws AuthenticationException {
		// TODO somehow test whether this is a valid username and a valid password
		BasicAuthenticationManager authenticationManager;
		authenticationManager = new BasicAuthenticationManager( username, password );
		authenticationManager.setAuthenticationForced(true);
		return authenticationManager;
		
		//ISVNAuthenticationManager authenticationManager = SVNWCUtil.createDefaultAuthenticationManager( username, password );
	}

}
